using System.Web;

namespace OrbitOne.GoogleCustomSearch.QueryParameters
{
    public abstract class QueryParameter
    {
        #region Properties
        public abstract string Name
        { get;}
        public abstract string Value
        {
            get; set;
        }
        #endregion Properties

        #region Constructor
       
        public QueryParameter(string value)
        {
            Value = value;

        }

        protected QueryParameter()
        {
            
        }

        #endregion Constructor

        #region Methods
        public virtual string Format()
        {
            return string.Format("{0}={1}", this.Name, HttpUtility.UrlEncode(this.Value));
        }
        #endregion Methods
    }
}